package ls.jpa.chapterB.domain;

import ls.jpa.chapterB.embedded.AddressPK;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Barudisshu
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "AddressType")
@DiscriminatorValue(value = "ADD")
@Table(name = "t_add")
public class Address implements Serializable {


    private String addressCountry;
    private String addressCity;
    @EmbeddedId
    private AddressPK addressPK;

    public String getAddressCountry() {
        return addressCountry;
    }

    public void setAddressCountry(String addressCountry) {
        this.addressCountry = addressCountry;
    }

    public String getAddressCity() {
        return addressCity;
    }

    public void setAddressCity(String addressCity) {
        this.addressCity = addressCity;
    }

    public AddressPK getAddressPK() {
        return addressPK;
    }

    public void setAddressPK(AddressPK addressPK) {
        this.addressPK = addressPK;
    }
}
